package com.apt.action;

import java.util.List;

import com.apt.common.AptException;
import com.apt.facade.DataStoreHelper;
import com.apt.model.StudentReport;

public class StudentReportAction extends AptBaseAction {
	
	private Integer selectedCollege;
	private List<StudentReport> studentReportList;

	public List<StudentReport> getStudentReport() {
		return studentReportList;
	}

	public String displayStudentReport() {
		try{
			System.out.println("The college id is:" + selectedCollege);
			studentReportList = DataStoreHelper.getStudentReport(selectedCollege);
		} catch (AptException ex) {
			addActionError(ex.getMessage());
			return "error";

		}
		return "success";
		
	}

	public Integer getSelectedCollege() {
		return selectedCollege;
	}

	public void setSelectedCollege(Integer selectedCollege) {
		this.selectedCollege = selectedCollege;
	}

	public List<StudentReport> getStudentReportList() {
		return studentReportList;
	}

	public void setStudentReportList(List<StudentReport> studentReportList) {
		this.studentReportList = studentReportList;
	}

	
	
}
